ad32167b8345f97fc44e4630eba1ab5e874ff7af,src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java,GeoImageLayer,extractExif,#ImageEntry#,505
Before Change
lon = (deg + (min / 60) + (sec / 3600));
if (Double.isNaN(lon))
throw new IllegalArgumentException();
if (dir.getString(GpsDirectory.TAG_GPS_LONGITUDE_REF).charAt(0) == 'W') {
After Change
if (Double.isNaN(deg) && Double.isNaN(min) && Double.isNaN(sec))
throw new IllegalArgumentException();
lon = (Double.isNaN(deg) ? 0 : deg + (Double.isNaN(min) ? 0 : (min / 60)) + (Double.isNaN(sec) ? 0 : (sec / 3600)));
if (dir.getString(GpsDirectory.TAG_GPS_LONGITUDE_REF).charAt(0) == 'W') {
lon = -lon;
}
// latitude
components = dir.getRationalArray(GpsDirectory.TAG_GPS_LATITUDE);
deg = components[0].doubleValue();
min = components[1].doubleValue();
sec = components[2].doubleValue();
if (Double.isNaN(deg) && Double.isNaN(min) && Double.isNaN(sec))
throw new IllegalArgumentException();
lat = (Double.isNaN(deg) ? 0 : deg + (Double.isNaN(min) ? 0 : (min / 60)) + (Double.isNaN(sec) ? 0 : (sec / 3600)));
if (Double.isNaN(lat))
throw new IllegalArgumentException();